package com.fs.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fs.pojo.Inventory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface InventoryMapper extends BaseMapper<Inventory> {

    /**
     * 查找所有信息
     * @param inventory
     * @return
     */
    List<Inventory> selectAll(Inventory inventory);

    /**
     * 修改商品库存
     * @param id 商品id
     * @param num 商品数量
     * @return
     */
    Integer updateNumById(@Param("id")Integer id,@Param("num") Integer num);
}
